package com.nanjia.boot.delivery.model.form;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 收货/收票管理表单对象
 *
 * @author 周洋
 * @since 2025-07-03 10:49
 */
@Getter
@Setter
@Schema(description = "收货/收票管理表单对象")
@JsonIgnoreProperties(ignoreUnknown = true)
public class DeliveryAddressForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "地址类型：")
    @NotNull(message = "地址类型：不能为空")
    private Integer deliveryType;

    @Schema(description = "收件人：")
    @NotBlank(message = "收件人：不能为空")
    @Size(max=30, message="收件人：长度不能超过30个字符")
    private String deliveryName;

    @Schema(description = "手机号：")
    @NotBlank(message = "手机号：不能为空")
    @Size(max=30, message="手机号：长度不能超过30个字符")
    private String deliveryPhone;

    @Schema(description = "邮编：")
    @Size(max=30, message="邮编：长度不能超过30个字符")
    private String postalCode;

    @Schema(description = "省：")
    @NotBlank(message = "省：不能为空")
    @Size(max=30, message="省：长度不能超过30个字符")
    private String deliveryProvince;

    @Schema(description = "市：")
    @NotBlank(message = "市：不能为空")
    @Size(max=30, message="市：长度不能超过30个字符")
    private String deliveryCity;

    @Schema(description = "区：")
    @NotBlank(message = "区：不能为空")
    @Size(max=30, message="区：长度不能超过30个字符")
    private String deliveryArea;

    @Schema(description = "详细地址：")
    @NotBlank(message = "详细地址：不能为空")
    @Size(max=300, message="详细地址：长度不能超过300个字符")
    private String deliveryDetail;

    @Schema(description = "是否默认：")
    @NotNull(message = "是否默认：不能为空")
    private Integer deliveryDefault;

    private String subdomainCode;

    private String subdomainUserCode;

    @Schema(description = "状态：")
    @NotNull(message = "状态：不能为空")
    private Integer deliveryStatus;


}
